//api.js   dot.js   dom7.js

/*
 * APICloud JavaScript Library
 * Copyright (c) 2014 apicloud.com
 */
(function(window){
    var u = {};
    var isAndroid = (/android/gi).test(navigator.appVersion);
    var uzStorage = function(){
        var ls = window.localStorage;
        if(isAndroid){
           ls = os.localStorage();
        }
        return ls;
    };
    function parseArguments(url, data, fnSuc, dataType) {
        if (typeof(data) == 'function') {
            dataType = fnSuc;
            fnSuc = data;
            data = undefined;
        }
        if (typeof(fnSuc) != 'function') {
            dataType = fnSuc;
            fnSuc = undefined;
        }
        return {
            url: url,
            data: data,
            fnSuc: fnSuc,
            dataType: dataType
        };
    }
    u.trim = function(str){
        if(String.prototype.trim){
            return str == null ? "" : String.prototype.trim.call(str);
        }else{
            return str.replace(/(^\s*)|(\s*$)/g, "");
        }
    };
    u.trimAll = function(str){
        return str.replace(/\s*/g,'');
    };
    u.isElement = function(obj){
        return !!(obj && obj.nodeType == 1);
    };
    u.isArray = function(obj){
        if(Array.isArray){
            return Array.isArray(obj);
        }else{
            return obj instanceof Array;
        }
    };
    u.isEmptyObject = function(obj){
        if(JSON.stringify(obj) === '{}'){
            return true;
        }
        return false;
    };
    u.addEvt = function(el, name, fn, useCapture){
        if(!u.isElement(el)){
            console.warn('$api.addEvt Function need el param, el param must be DOM Element');
            return;
        }
        useCapture = useCapture || false;
        if(el.addEventListener) {
            el.addEventListener(name, fn, useCapture);
        }
    };
    u.rmEvt = function(el, name, fn, useCapture){
        if(!u.isElement(el)){
            console.warn('$api.rmEvt Function need el param, el param must be DOM Element');
            return;
        }
        useCapture = useCapture || false;
        if (el.removeEventListener) {
            el.removeEventListener(name, fn, useCapture);
        }
    };
    u.one = function(el, name, fn, useCapture){
        if(!u.isElement(el)){
            console.warn('$api.one Function need el param, el param must be DOM Element');
            return;
        }
        useCapture = useCapture || false;
        var that = this;
        var cb = function(){
            fn && fn();
            that.rmEvt(el, name, cb, useCapture);
        };
        that.addEvt(el, name, cb, useCapture);
    };
    u.dom = function(el, selector){
        if(arguments.length === 1 && typeof arguments[0] == 'string'){
            if(document.querySelector){
                return document.querySelector(arguments[0]);
            }
        }else if(arguments.length === 2){
            if(el.querySelector){
                return el.querySelector(selector);
            }
        }
    };
    u.domAll = function(el, selector){
        if(arguments.length === 1 && typeof arguments[0] == 'string'){
            if(document.querySelectorAll){
                return document.querySelectorAll(arguments[0]);
            }
        }else if(arguments.length === 2){
            if(el.querySelectorAll){
                return el.querySelectorAll(selector);
            }
        }
    };
    u.byId = function(id){
        return document.getElementById(id);
    };
    u.first = function(el, selector){
        if(arguments.length === 1){
            if(!u.isElement(el)){
                console.warn('$api.first Function need el param, el param must be DOM Element');
                return;
            }
            return el.children[0];
        }
        if(arguments.length === 2){
            return this.dom(el, selector+':first-child');
        }
    };
    u.last = function(el, selector){
        if(arguments.length === 1){
            if(!u.isElement(el)){
                console.warn('$api.last Function need el param, el param must be DOM Element');
                return;
            }
            var children = el.children;
            return children[children.length - 1];
        }
        if(arguments.length === 2){
            return this.dom(el, selector+':last-child');
        }
    };
    u.eq = function(el, index){
        return this.dom(el, ':nth-child('+ index +')');
    };
    u.not = function(el, selector){
        return this.domAll(el, ':not('+ selector +')');
    };
    u.prev = function(el){
        if(!u.isElement(el)){
            console.warn('$api.prev Function need el param, el param must be DOM Element');
            return;
        }
        var node = el.previousSibling;
        if(node.nodeType && node.nodeType === 3){
            node = node.previousSibling;
            return node;
        }
    };
    u.next = function(el){
        if(!u.isElement(el)){
            console.warn('$api.next Function need el param, el param must be DOM Element');
            return;
        }
        var node = el.nextSibling;
        if(node.nodeType && node.nodeType === 3){
            node = node.nextSibling;
            return node;
        }
    };
    u.closest = function(el, selector){
        if(!u.isElement(el)){
            console.warn('$api.closest Function need el param, el param must be DOM Element');
            return;
        }
        var doms, targetDom;
        var isSame = function(doms, el){
            var i = 0, len = doms.length;
            for(i; i<len; i++){
                if(doms[i].isSameNode(el)){
                    return doms[i];
                }
            }
            return false;
        };
        var traversal = function(el, selector){
            doms = u.domAll(el.parentNode, selector);
            targetDom = isSame(doms, el);
            while(!targetDom){
                el = el.parentNode;
                if(el != null && el.nodeType == el.DOCUMENT_NODE){
                    return false;
                }
                traversal(el, selector);
            }

            return targetDom;
        };

        return traversal(el, selector);
    };
    u.contains = function(parent,el){
        var mark = false;
        if(el === parent){
            mark = true;
            return mark;
        }else{
            do{
                el = el.parentNode;
                if(el === parent){
                    mark = true;
                    return mark;
                }
            }while(el === document.body || el === document.documentElement);

            return mark;
        }
        
    };
    u.remove = function(el){
        if(el && el.parentNode){
            el.parentNode.removeChild(el);
        }
    };
    u.attr = function(el, name, value){
        if(!u.isElement(el)){
            console.warn('$api.attr Function need el param, el param must be DOM Element');
            return;
        }
        if(arguments.length == 2){
            return el.getAttribute(name);
        }else if(arguments.length == 3){
            el.setAttribute(name, value);
            return el;
        }
    };
    u.removeAttr = function(el, name){
        if(!u.isElement(el)){
            console.warn('$api.removeAttr Function need el param, el param must be DOM Element');
            return;
        }
        if(arguments.length === 2){
            el.removeAttribute(name);
        }
    };
    u.hasCls = function(el, cls){
        if(!u.isElement(el)){
            console.warn('$api.hasCls Function need el param, el param must be DOM Element');
            return;
        }
        if(el.className.indexOf(cls) > -1){
            return true;
        }else{
            return false;
        }
    };
    u.addCls = function(el, cls){
        if(!u.isElement(el)){
            console.warn('$api.addCls Function need el param, el param must be DOM Element');
            return;
        }
        if('classList' in el){
            el.classList.add(cls);
        }else{
            var preCls = el.className;
            var newCls = preCls +' '+ cls;
            el.className = newCls;
        }
        return el;
    };
    u.removeCls = function(el, cls){
        if(!u.isElement(el)){
            console.warn('$api.removeCls Function need el param, el param must be DOM Element');
            return;
        }
        if('classList' in el){
            el.classList.remove(cls);
        }else{
            var preCls = el.className;
            var newCls = preCls.replace(cls, '');
            el.className = newCls;
        }
        return el;
    };
    u.toggleCls = function(el, cls){
        if(!u.isElement(el)){
            console.warn('$api.toggleCls Function need el param, el param must be DOM Element');
            return;
        }
       if('classList' in el){
            el.classList.toggle(cls);
        }else{
            if(u.hasCls(el, cls)){
                u.removeCls(el, cls);
            }else{
                u.addCls(el, cls);
            }
        }
        return el;
    };
    u.val = function(el, val){
        if(!u.isElement(el)){
            console.warn('$api.val Function need el param, el param must be DOM Element');
            return;
        }
        if(arguments.length === 1){
            switch(el.tagName){
                case 'SELECT':
                    var value = el.options[el.selectedIndex].value;
                    return value;
                    break;
                case 'INPUT':
                    return el.value;
                    break;
                case 'TEXTAREA':
                    return el.value;
                    break;
            }
        }
        if(arguments.length === 2){
            switch(el.tagName){
                case 'SELECT':
                    el.options[el.selectedIndex].value = val;
                    return el;
                    break;
                case 'INPUT':
                    el.value = val;
                    return el;
                    break;
                case 'TEXTAREA':
                    el.value = val;
                    return el;
                    break;
            }
        }
        
    };
    u.prepend = function(el, html){
        if(!u.isElement(el)){
            console.warn('$api.prepend Function need el param, el param must be DOM Element');
            return;
        }
        el.insertAdjacentHTML('afterbegin', html);
        return el;
    };
    u.append = function(el, html){
        if(!u.isElement(el)){
            console.warn('$api.append Function need el param, el param must be DOM Element');
            return;
        }
        el.insertAdjacentHTML('beforeend', html);
        return el;
    };
    u.before = function(el, html){
        if(!u.isElement(el)){
            console.warn('$api.before Function need el param, el param must be DOM Element');
            return;
        }
        el.insertAdjacentHTML('beforebegin', html);
        return el;
    };
    u.after = function(el, html){
        if(!u.isElement(el)){
            console.warn('$api.after Function need el param, el param must be DOM Element');
            return;
        }
        el.insertAdjacentHTML('afterend', html);
        return el;
    };
    u.html = function(el, html){
        if(!u.isElement(el)){
            console.warn('$api.html Function need el param, el param must be DOM Element');
            return;
        }
        if(arguments.length === 1){
            return el.innerHTML;
        }else if(arguments.length === 2){
            el.innerHTML = html;
            return el;
        }
    };
    u.text = function(el, txt){
        if(!u.isElement(el)){
            console.warn('$api.text Function need el param, el param must be DOM Element');
            return;
        }
        if(arguments.length === 1){
            return el.textContent;
        }else if(arguments.length === 2){
            el.textContent = txt;
            return el;
        }
    };
    u.offset = function(el){
        if(!u.isElement(el)){
            console.warn('$api.offset Function need el param, el param must be DOM Element');
            return;
        }
        var sl = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
        var st = Math.max(document.documentElement.scrollTop, document.body.scrollTop);

        var rect = el.getBoundingClientRect();
        return {
            l: rect.left + sl,
            t: rect.top + st,
            w: el.offsetWidth,
            h: el.offsetHeight
        };
    };
    u.css = function(el, css){
        if(!u.isElement(el)){
            console.warn('$api.css Function need el param, el param must be DOM Element');
            return;
        }
        if(typeof css == 'string' && css.indexOf(':') > 0){
            el.style && (el.style.cssText += ';' + css);
        }
    };
    u.cssVal = function(el, prop){
        if(!u.isElement(el)){
            console.warn('$api.cssVal Function need el param, el param must be DOM Element');
            return;
        }
        if(arguments.length === 2){
            var computedStyle = window.getComputedStyle(el, null);
            return computedStyle.getPropertyValue(prop);
        }
    };
    u.jsonToStr = function(json){
        if(typeof json === 'object'){
            return JSON && JSON.stringify(json);
        }
    };
    u.strToJson = function(str){
        if(typeof str === 'string'){
            return JSON && JSON.parse(str);
        }
    };
    u.setStorage = function(key, value){
        if(arguments.length === 2){
            var v = value;
            if(typeof v == 'object'){
                v = JSON.stringify(v);
                v = 'obj-'+ v;
            }else{
                v = 'str-'+ v;
            }
            var ls = localStorage;
            if(ls){
                ls.setItem(key, v);
            }
        }
    };
    u.getStorage = function(key){
        var ls = localStorage;
        if(ls){
            var v = ls.getItem(key);
            if(!v){return;}
            if(v.indexOf('obj-') === 0){
                v = v.slice(4);
                return JSON.parse(v);
            }else if(v.indexOf('str-') === 0){
                return v.slice(4);
            }
        }
    };
    u.rmStorage = function(key){
        var ls = localStorage;
        if(ls && key){
            ls.removeItem(key);
        }
    };
    u.clearStorage = function(){
        var ls = localStorage;
        if(ls){
            ls.clear();
        }
    };
    u.fixIos7Bar = function(el){
        return u.fixStatusBar(el);
    };
    u.fixStatusBar = function(el){
        if(!u.isElement(el)){
            console.warn('$api.fixStatusBar Function need el param, el param must be DOM Element');
            return 0;
        }
        el.style.paddingTop = api.safeArea.top + 'px';
        return el.offsetHeight;
    };
    u.fixTabBar = function(el){
        if(!u.isElement(el)){
            console.warn('$api.fixTabBar Function need el param, el param must be DOM Element');
            return 0;
        }
        el.style.paddingBottom = api.safeArea.bottom + 'px';
        return el.offsetHeight;
    };
    u.toast = function(title, text, time){
        var opts = {};
        var show = function(opts, time){
            api.showProgress(opts);
            setTimeout(function(){
                api.hideProgress();
            },time);
        };
        if(arguments.length === 1){
            var time = time || 500;
            if(typeof title === 'number'){
                time = title;
            }else{
                opts.title = title+'';
            }
            show(opts, time);
        }else if(arguments.length === 2){
            var time = time || 500;
            var text = text;
            if(typeof text === "number"){
                var tmp = text;
                time = tmp;
                text = null;
            }
            if(title){
                opts.title = title;
            }
            if(text){
                opts.text = text;
            }
            show(opts, time);
        }
        if(title){
            opts.title = title;
        }
        if(text){
            opts.text = text;
        }
        time = time || 500;
        show(opts, time);
    };
    u.post = function(/*url,data,fnSuc,dataType*/){
        var argsToJson = parseArguments.apply(null, arguments);
        var json = {};
        var fnSuc = argsToJson.fnSuc;
        argsToJson.url && (json.url = argsToJson.url);
        argsToJson.data && (json.data = argsToJson.data);
        if(argsToJson.dataType){
            var type = argsToJson.dataType.toLowerCase();
            if (type == 'text'||type == 'json') {
                json.dataType = type;
            }
        }else{
            json.dataType = 'json';
        }
        json.method = 'post';
        api.ajax(json,
            function(ret,err){
                if (ret) {
                    fnSuc && fnSuc(ret);
                }
            }
        );
    };
    u.get = function(/*url,fnSuc,dataType*/){
        var argsToJson = parseArguments.apply(null, arguments);
        var json = {};
        var fnSuc = argsToJson.fnSuc;
        argsToJson.url && (json.url = argsToJson.url);
        //argsToJson.data && (json.data = argsToJson.data);
        if(argsToJson.dataType){
            var type = argsToJson.dataType.toLowerCase();
            if (type == 'text'||type == 'json') {
                json.dataType = type;
            }
        }else{
            json.dataType = 'text';
        }
        json.method = 'get';
        api.ajax(json,
            function(ret,err){
                if (ret) {
                    fnSuc && fnSuc(ret);
                }
            }
        );
    };

/*end*/
    

    window.$api = u;

})(window);


/* Laura Doktorova https://github.com/olado/doT */
(function(){function p(b,a,d){return("string"===typeof a?a:a.toString()).replace(b.define||h,function(a,c,e,g){0===c.indexOf("def.")&&(c=c.substring(4));c in d||(":"===e?(b.defineParams&&g.replace(b.defineParams,function(a,b,l){d[c]={arg:b,text:l}}),c in d||(d[c]=g)):(new Function("def","def['"+c+"']="+g))(d));return""}).replace(b.use||h,function(a,c){b.useParams&&(c=c.replace(b.useParams,function(a,b,c,l){if(d[c]&&d[c].arg&&l)return a=(c+":"+l).replace(/'|\\/g,"_"),d.__exp=d.__exp||{},d.__exp[a]=
d[c].text.replace(new RegExp("(^|[^\\w$])"+d[c].arg+"([^\\w$])","g"),"$1"+l+"$2"),b+"def.__exp['"+a+"']"}));var e=(new Function("def","return "+c))(d);return e?p(b,e,d):e})}function k(b){return b.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}var f={version:"1.0.3",templateSettings:{evaluate:/\{\{([\s\S]+?(\}?)+)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,encode:/\{\{!([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,useParams:/(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,
define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,defineParams:/^\s*([\w$]+):([\s\S]+)/,conditional:/\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,varname:"it",strip:!0,append:!0,selfcontained:!1,doNotSkipEncoded:!1},template:void 0,compile:void 0},m;f.encodeHTMLSource=function(b){var a={"&":"&#38;","<":"&#60;",">":"&#62;",'"':"&#34;","'":"&#39;","/":"&#47;"},d=b?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(b){return b?
b.toString().replace(d,function(b){return a[b]||b}):""}};m=function(){return this||(0,eval)("this")}();"undefined"!==typeof module&&module.exports?module.exports=f:"function"===typeof define&&define.amd?define(function(){return f}):m.doT=f;var r={start:"'+(",end:")+'",startencode:"'+encodeHTML("},s={start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("},h=/$^/;f.template=function(b,a,d){a=a||f.templateSettings;var n=a.append?r:s,c,e=0,g;b=a.use||a.define?p(a,b,d||{}):b;b=("var out='"+(a.strip?
b.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):b).replace(/'|\\/g,"\\$&").replace(a.interpolate||h,function(b,a){return n.start+k(a)+n.end}).replace(a.encode||h,function(b,a){c=!0;return n.startencode+k(a)+n.end}).replace(a.conditional||h,function(b,a,c){return a?c?"';}else if("+k(c)+"){out+='":"';}else{out+='":c?"';if("+k(c)+"){out+='":"';}out+='"}).replace(a.iterate||h,function(b,a,c,d){if(!a)return"';} } out+='";e+=1;g=d||"i"+e;a=k(a);return"';var arr"+
e+"="+a+";if(arr"+e+"){var "+c+","+g+"=-1,l"+e+"=arr"+e+".length-1;while("+g+"<l"+e+"){"+c+"=arr"+e+"["+g+"+=1];out+='"}).replace(a.evaluate||h,function(a,b){return"';"+k(b)+"out+='"})+"';return out;").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/(\s|;|\}|^|\{)out\+='';/g,"$1").replace(/\+''/g,"");c&&(a.selfcontained||!m||m._encodeHTML||(m._encodeHTML=f.encodeHTMLSource(a.doNotSkipEncoded)),b="var encodeHTML = typeof _encodeHTML !== 'undefined' ? _encodeHTML : ("+f.encodeHTMLSource.toString()+
"("+(a.doNotSkipEncoded||"")+"));"+b);try{return new Function(a.varname,b)}catch(q){throw"undefined"!==typeof console&&console.log("Could not create a template function: "+b),q;}};f.compile=function(b,a){return f.template(b,null,a)}})();

/**
 * Dom7 2.0.1
 * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
 * http://framework7.io/docs/dom.html
 *
 * Copyright 2017, Vladimir Kharlampidi
 * The iDangero.us
 * http://www.idangero.us/
 *
 * Licensed under MIT
 *
 * Released on: October 2, 2017
 */!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Dom7=e()}(this,function(){"use strict";function t(t,e){var n=[],i=0;if(t&&!e&&t instanceof Pt)return t;if(t)if("string"==typeof t){var r,o,s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var a="div";for(0===s.indexOf("<li")&&(a="ul"),0===s.indexOf("<tr")&&(a="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(a="tr"),0===s.indexOf("<tbody")&&(a="table"),0===s.indexOf("<option")&&(a="select"),o=document.createElement(a),o.innerHTML=s,i=0;i<o.childNodes.length;i+=1)n.push(o.childNodes[i])}else for(r=e||"#"!==t[0]||t.match(/[ .<>:~]/)?(e||document).querySelectorAll(t.trim()):[document.getElementById(t.trim().split("#")[1])],i=0;i<r.length;i+=1)r[i]&&n.push(r[i])}else if(t.nodeType||t===window||t===document)n.push(t);else if(t.length>0&&t[0].nodeType)for(i=0;i<t.length;i+=1)n.push(t[i]);return new Pt(n)}function e(t){for(var e=[],n=0;n<t.length;n+=1)-1===e.indexOf(t[n])&&e.push(t[n]);return e}function n(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function i(t){return window.requestAnimationFrame?window.requestAnimationFrame(t):window.webkitRequestAnimationFrame?window.webkitRequestAnimationFrame(t):window.setTimeout(t,1e3/60)}function r(t){return window.cancelAnimationFrame?window.cancelAnimationFrame(t):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(t):window.clearTimeout(t)}function o(t){var e=this;if(void 0===t)return this;for(var n=t.split(" "),i=0;i<n.length;i+=1)for(var r=0;r<this.length;r+=1)void 0!==e[r].classList&&e[r].classList.add(n[i]);return this}function s(t){for(var e=this,n=t.split(" "),i=0;i<n.length;i+=1)for(var r=0;r<this.length;r+=1)void 0!==e[r].classList&&e[r].classList.remove(n[i]);return this}function a(t){return!!this[0]&&this[0].classList.contains(t)}function l(t){for(var e=this,n=t.split(" "),i=0;i<n.length;i+=1)for(var r=0;r<this.length;r+=1)void 0!==e[r].classList&&e[r].classList.toggle(n[i]);return this}function h(t,e){var n=arguments,i=this;if(1!==arguments.length||"string"!=typeof t){for(var r=0;r<this.length;r+=1)if(2===n.length)i[r].setAttribute(t,e);else for(var o in t)i[r][o]=t[o],i[r].setAttribute(o,t[o]);return this}if(this[0])return this[0].getAttribute(t)}function f(t){for(var e=this,n=0;n<this.length;n+=1)e[n].removeAttribute(t);return this}function u(t,e){var n=arguments,i=this;if(1!==arguments.length||"string"!=typeof t){for(var r=0;r<this.length;r+=1)if(2===n.length)i[r][t]=e;else for(var o in t)i[r][o]=t[o];return this}if(this[0])return this[0][t]}function c(t,e){var n,i=this;if(void 0!==e){for(var r=0;r<this.length;r+=1)n=i[r],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[t]=e;return this}if(n=this[0]){if(n.dom7ElementDataStorage&&t in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[t];var o=n.getAttribute("data-"+t);if(o)return o}else;}function d(t){for(var e=this,n=0;n<this.length;n+=1){var i=e[n];i.dom7ElementDataStorage&&i.dom7ElementDataStorage[t]&&(i.dom7ElementDataStorage[t]=null,delete i.dom7ElementDataStorage[t])}}function v(){var t=this[0];if(t){var e={};if(t.dataset)for(var i in t.dataset)e[i]=t.dataset[i];else for(var r=0;r<t.attributes.length;r+=1){var o=t.attributes[r];o.name.indexOf("data-")>=0&&(e[n(o.name.split("data-")[1])]=o.value)}for(var s in e)"false"===e[s]?e[s]=!1:"true"===e[s]?e[s]=!0:parseFloat(e[s])===1*e[s]&&(e[s]*=1);return e}}function p(t){var e=this;{if(void 0!==t){for(var n=0;n<this.length;n+=1)e[n].value=t;return this}if(this[0]){if(this[0].multiple&&"select"===this[0].nodeName.toLowerCase()){for(var i=[],r=0;r<this[0].selectedOptions.length;r+=1)i.push(e[0].selectedOptions[r].value);return i}return this[0].value}}}function g(t){for(var e=this,n=0;n<this.length;n+=1){var i=e[n].style;i.webkitTransform=t,i.transform=t}return this}function m(t){var e=this;"string"!=typeof t&&(t+="ms");for(var n=0;n<this.length;n+=1){var i=e[n].style;i.webkitTransitionDuration=t,i.transitionDuration=t}return this}function y(){function e(e){var n=e.target;if(n){var i=e.target.dom7EventData||[];if(i.unshift(e),t(n).is(a))l.apply(n,i);else for(var r=t(n).parents(),o=0;o<r.length;o+=1)t(r[o]).is(a)&&l.apply(r[o],i)}}function n(t){var e=t&&t.target?t.target.dom7EventData||[]:[];e.unshift(t),l.apply(this,e)}for(var i=this,r=[],o=arguments.length;o--;)r[o]=arguments[o];var s=r[0],a=r[1],l=r[2],h=r[3];if("function"==typeof r[1]){var f;f=r,s=f[0],l=f[1],h=f[2],a=void 0}h||(h=!1);for(var u,c=s.split(" "),d=0;d<this.length;d+=1){var v=i[d];if(a)for(u=0;u<c.length;u+=1)v.dom7LiveListeners||(v.dom7LiveListeners=[]),v.dom7LiveListeners.push({type:s,listener:l,proxyListener:e}),v.addEventListener(c[u],e,h);else for(u=0;u<c.length;u+=1)v.dom7Listeners||(v.dom7Listeners=[]),v.dom7Listeners.push({type:s,listener:l,proxyListener:n}),v.addEventListener(c[u],n,h)}return this}function w(){for(var t=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=e[0],r=e[1],o=e[2],s=e[3];if("function"==typeof e[1]){var a;a=e,i=a[0],o=a[1],s=a[2],r=void 0}s||(s=!1);for(var l=i.split(" "),h=0;h<l.length;h+=1)for(var f=0;f<this.length;f+=1){var u=t[f];if(r){if(u.dom7LiveListeners)for(var c=0;c<u.dom7LiveListeners.length;c+=1)o?u.dom7LiveListeners[c].listener===o&&u.removeEventListener(l[h],u.dom7LiveListeners[c].proxyListener,s):u.dom7LiveListeners[c].type===l[h]&&u.removeEventListener(l[h],u.dom7LiveListeners[c].proxyListener,s)}else if(u.dom7Listeners)for(var d=0;d<u.dom7Listeners.length;d+=1)o?u.dom7Listeners[d].listener===o&&u.removeEventListener(l[h],u.dom7Listeners[d].proxyListener,s):u.dom7Listeners[d].type===l[h]&&u.removeEventListener(l[h],u.dom7Listeners[d].proxyListener,s)}return this}function b(){function t(e){var n=e.target.dom7EventData||[];s.apply(this,n),i.off(r,o,t,a)}for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var i=this,r=e[0],o=e[1],s=e[2],a=e[3];if("function"==typeof e[1]){var l;l=e,r=l[0],s=l[1],a=l[2],o=void 0}return i.on(r,o,t,a)}function L(){for(var t=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];for(var i=e[0].split(" "),r=e[1],o=0;o<i.length;o+=1)for(var s=0;s<this.length;s+=1){var a=void 0;try{a=new window.CustomEvent(i[o],{detail:r,bubbles:!0,cancelable:!0})}catch(t){a=document.createEvent("Event"),a.initEvent(i[o],!0,!0),a.detail=r}t[s].dom7EventData=e.filter(function(t,e){return e>0}),t[s].dispatchEvent(a),t[s].dom7EventData=[],delete t[s].dom7EventData}return this}function E(t){function e(o){if(o.target===this)for(t.call(this,o),n=0;n<i.length;n+=1)r.off(i[n],e)}var n,i=["webkitTransitionEnd","transitionend"],r=this;if(t)for(n=0;n<i.length;n+=1)r.on(i[n],e);return this}function x(t){function e(o){if(o.target===this)for(t.call(this,o),n=0;n<i.length;n+=1)r.off(i[n],e)}var n,i=["webkitAnimationEnd","animationend"],r=this;if(t)for(n=0;n<i.length;n+=1)r.on(i[n],e);return this}function S(){return this[0]===window?window.innerWidth:this.length>0?parseFloat(this.css("width")):null}function T(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function A(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null}function N(t){if(this.length>0){if(t){var e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function C(){if(this.length>0){var t=this[0],e=t.getBoundingClientRect(),n=document.body,i=t.clientTop||n.clientTop||0,r=t.clientLeft||n.clientLeft||0,o=t===window?window.scrollY:t.scrollTop,s=t===window?window.scrollX:t.scrollLeft;return{top:e.top+o-i,left:e.left+s-r}}return null}function k(){for(var t=this,e=0;e<this.length;e+=1)t[e].style.display="none";return this}function D(){for(var t=this,e=0;e<this.length;e+=1){var n=t[e];"none"===n.style.display&&(n.style.display=""),"none"===window.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function M(){return this[0]?window.getComputedStyle(this[0],null):{}}function O(t,e){var n,i=this;if(1===arguments.length){if("string"!=typeof t){for(n=0;n<this.length;n+=1)for(var r in t)i[n].style[r]=t[r];return this}if(this[0])return window.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(n=0;n<this.length;n+=1)i[n].style[t]=e;return this}return this}function F(){for(var t=this,e=[],n=0;n<this.length;n+=1)e.push(t[n]);return e}function I(t){var e=this;if(!t)return this;for(var n=0;n<this.length;n+=1)if(!1===t.call(e[n],n,e[n]))return e;return this}function V(t){var e=this;if(!t)return this;for(var n=0;n<this.length;n+=1)if(!1===t.call(e[n],e[n],n))return e;return this}function q(t){for(var e=[],n=this,i=0;i<n.length;i+=1)t.call(n[i],i,n[i])&&e.push(n[i]);return new Pt(e)}function H(t){for(var e=[],n=this,i=0;i<n.length;i+=1)e.push(t.call(n[i],i,n[i]));return new Pt(e)}function P(t){var e=this;if(void 0===t)return this[0]?this[0].innerHTML:void 0;for(var n=0;n<this.length;n+=1)e[n].innerHTML=t;return this}function B(t){var e=this;if(void 0===t)return this[0]?this[0].textContent.trim():null;for(var n=0;n<this.length;n+=1)e[n].textContent=t;return this}function j(e){var n,i,r=this[0];if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(n=t(e),i=0;i<n.length;i+=1)if(n[i]===r)return!0;return!1}if(e===document)return r===document;if(e===window)return r===window;if(e.nodeType||e instanceof Pt){for(n=e.nodeType?[e]:e,i=0;i<n.length;i+=1)if(n[i]===r)return!0;return!1}return!1}function z(t){for(var e=this,n=0;n<this.length;n+=1)if(e[n]===t)return n;return-1}function W(){var t,e=this[0];if(e){for(t=0;null!==(e=e.previousSibling);)1===e.nodeType&&(t+=1);return t}}function R(t){if(void 0===t)return this;var e,n=this.length;return t>n-1?new Pt([]):t<0?(e=n+t,new Pt(e<0?[]:[this[e]])):new Pt([this[t]])}function U(){for(var t=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];for(var i,r=0;r<e.length;r+=1){i=e[r];for(var o=0;o<this.length;o+=1)if("string"==typeof i){var s=document.createElement("div");for(s.innerHTML=i;s.firstChild;)t[o].appendChild(s.firstChild)}else if(i instanceof Pt)for(var a=0;a<i.length;a+=1)t[o].appendChild(i[a]);else t[o].appendChild(i)}return this}function X(e){return t(e).append(this),this}function Y(t){var e,n,i=this;for(e=0;e<this.length;e+=1)if("string"==typeof t){var r=document.createElement("div");for(r.innerHTML=t,n=r.childNodes.length-1;n>=0;n-=1)i[e].insertBefore(r.childNodes[n],i[e].childNodes[0])}else if(t instanceof Pt)for(n=0;n<t.length;n+=1)i[e].insertBefore(t[n],i[e].childNodes[0]);else i[e].insertBefore(t,i[e].childNodes[0]);return this}function G(e){return t(e).prepend(this),this}function J(e){for(var n=this,i=t(e),r=0;r<this.length;r+=1)if(1===i.length)i[0].parentNode.insertBefore(n[r],i[0]);else if(i.length>1)for(var o=0;o<i.length;o+=1)i[o].parentNode.insertBefore(n[r].cloneNode(!0),i[o])}function K(e){for(var n=this,i=t(e),r=0;r<this.length;r+=1)if(1===i.length)i[0].parentNode.insertBefore(n[r],i[0].nextSibling);else if(i.length>1)for(var o=0;o<i.length;o+=1)i[o].parentNode.insertBefore(n[r].cloneNode(!0),i[o].nextSibling)}function Q(e){return new Pt(this.length>0?e?this[0].nextElementSibling&&t(this[0].nextElementSibling).is(e)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])}function Z(e){var n=[],i=this[0];if(!i)return new Pt([]);for(;i.nextElementSibling;){var r=i.nextElementSibling;e?t(r).is(e)&&n.push(r):n.push(r),i=r}return new Pt(n)}function $(e){if(this.length>0){var n=this[0];return new Pt(e?n.previousElementSibling&&t(n.previousElementSibling).is(e)?[n.previousElementSibling]:[]:n.previousElementSibling?[n.previousElementSibling]:[])}return new Pt([])}function _(e){var n=[],i=this[0];if(!i)return new Pt([]);for(;i.previousElementSibling;){var r=i.previousElementSibling;e?t(r).is(e)&&n.push(r):n.push(r),i=r}return new Pt(n)}function tt(t){return this.nextAll(t).add(this.prevAll(t))}function et(n){for(var i=this,r=[],o=0;o<this.length;o+=1)null!==i[o].parentNode&&(n?t(i[o].parentNode).is(n)&&r.push(i[o].parentNode):r.push(i[o].parentNode));return t(e(r))}function nt(n){for(var i=this,r=[],o=0;o<this.length;o+=1)for(var s=i[o].parentNode;s;)n?t(s).is(n)&&r.push(s):r.push(s),s=s.parentNode;return t(e(r))}function it(t){var e=this;return void 0===t?new Pt([]):(e.is(t)||(e=e.parents(t).eq(0)),e)}function rt(t){for(var e=this,n=[],i=0;i<this.length;i+=1)for(var r=e[i].querySelectorAll(t),o=0;o<r.length;o+=1)n.push(r[o]);return new Pt(n)}function ot(n){for(var i=this,r=[],o=0;o<this.length;o+=1)for(var s=i[o].childNodes,a=0;a<s.length;a+=1)n?1===s[a].nodeType&&t(s[a]).is(n)&&r.push(s[a]):1===s[a].nodeType&&r.push(s[a]);return new Pt(e(r))}function st(){for(var t=this,e=0;e<this.length;e+=1)t[e].parentNode&&t[e].parentNode.removeChild(t[e]);return this}function at(){return this.remove()}function lt(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var i,r,o=this;for(i=0;i<e.length;i+=1){var s=t(e[i]);for(r=0;r<s.length;r+=1)o[o.length]=s[r],o.length+=1}return o}function ht(){for(var t=this,e=0;e<this.length;e+=1){var n=t[e];if(1===n.nodeType){for(var i=0;i<n.childNodes.length;i+=1)n.childNodes[i].parentNode&&n.childNodes[i].parentNode.removeChild(n.childNodes[i]);n.textContent=""}}return this}function ft(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=t[0],r=t[1],o=t[2],s=t[3],a=t[4];if(4===t.length&&"function"==typeof s){a=s;var l;l=t,n=l[0],r=l[1],o=l[2],a=l[3],s=l[4]}return void 0===s&&(s="swing"),this.each(function(){function t(n){void 0===n&&(n=(new Date).getTime()),null===y&&(y=n);var r,h=Math.max(Math.min((n-y)/o,1),0),f="linear"===s?h:.5-Math.cos(h*Math.PI)/2;if(g&&(d=e+f*(u-e)),m&&(v=l+f*(c-l)),g&&u>e&&d>=u&&(p.scrollTop=u,r=!0),g&&u<e&&d<=u&&(p.scrollTop=u,r=!0),m&&c>l&&v>=c&&(p.scrollLeft=c,r=!0),m&&c<l&&v<=c&&(p.scrollLeft=c,r=!0),r)return void(a&&a());g&&(p.scrollTop=d),m&&(p.scrollLeft=v),i(t)}var e,l,h,f,u,c,d,v,p=this,g=r>0||0===r,m=n>0||0===n;if(void 0===s&&(s="swing"),g&&(e=p.scrollTop,o||(p.scrollTop=r)),m&&(l=p.scrollLeft,o||(p.scrollLeft=n)),o){g&&(h=p.scrollHeight-p.offsetHeight,u=Math.max(Math.min(r,h),0)),m&&(f=p.scrollWidth-p.offsetWidth,c=Math.max(Math.min(n,f),0));var y=null;g&&u===e&&(g=!1),m&&c===l&&(m=!1),i(t)}})}function ut(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=t[0],i=t[1],r=t[2],o=t[3];if(3===t.length&&"function"==typeof r){var s;s=t,n=s[0],i=s[1],o=s[2],r=s[3]}var a=this;return void 0===n?a.length>0?a[0].scrollTop:null:a.scrollTo(void 0,n,i,r,o)}function ct(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=t[0],i=t[1],r=t[2],o=t[3];if(3===t.length&&"function"==typeof r){var s;s=t,n=s[0],i=s[1],o=s[2],r=s[3]}var a=this;return void 0===n?a.length>0?a[0].scrollLeft:null:a.scrollTo(n,void 0,i,r,o)}function dt(e,n){var o=this,s={props:t.extend({},e),params:t.extend({duration:300,easing:"swing"},n),elements:o,animating:!1,que:[],easingProgress:function(t,e){return"swing"===t?.5-Math.cos(e*Math.PI)/2:"function"==typeof t?t(e):e},stop:function(){s.frameId&&r(s.frameId),s.animating=!1,s.elements.each(function(t,e){delete e.dom7AnimateInstance}),s.que=[]},done:function(t){if(s.animating=!1,s.elements.each(function(t,e){delete e.dom7AnimateInstance}),t&&t(o),s.que.length>0){var e=s.que.shift();s.animate(e[0],e[1])}},animate:function(t,e){function n(){a=(new Date).getTime();var d,v;c||(c=!0,e.begin&&e.begin(o)),null===h&&(h=a),e.progress&&e.progress(o,Math.max(Math.min((a-h)/e.duration,1),0),h+e.duration-a<0?0:h+e.duration-a,h),r.forEach(function(n){var i=n;l||i.done||Object.keys(t).forEach(function(n){if(!l&&!i.done){d=Math.max(Math.min((a-h)/e.duration,1),0),v=s.easingProgress(e.easing,d);var o=i[n],c=o.initialValue,p=o.finalValue,g=o.unit;i[n].currentValue=c+v*(p-c);var m=i[n].currentValue;if((p>c&&m>=p||p<c&&m<=p)&&(i.container.style[n]=p+g,u+=1,u===Object.keys(t).length&&(i.done=!0,f+=1),f===r.length&&(l=!0)),l)return void s.done(e.complete);i.container.style[n]=m+g}})}),l||(s.frameId=i(n))}if(s.animating)return s.que.push([t,e]),s;var r=[];s.elements.each(function(e,n){var i,o,a,l,h;n.dom7AnimateInstance||(s.elements[e].dom7AnimateInstance=s),r[e]={container:n},Object.keys(t).forEach(function(s){i=window.getComputedStyle(n,null).getPropertyValue(s).replace(",","."),o=parseFloat(i),a=i.replace(o,""),l=parseFloat(t[s]),h=t[s]+a,r[e][s]={initialFullValue:i,initialValue:o,unit:a,finalValue:l,finalFullValue:h,currentValue:o}})});var a,l,h=null,f=0,u=0,c=!1;return s.animating=!0,s.frameId=i(n),s}};if(0===s.elements.length)return o;for(var a,l=0;l<s.elements.length;l+=1)s.elements[l].dom7AnimateInstance?a=s.elements[l].dom7AnimateInstance:s.elements[l].dom7AnimateInstance=s;return a||(a=s),"stop"===e?a.stop():a.animate(s.props,s.params),o}function vt(){for(var t=this,e=0;e<t.length;e+=1)t[e].dom7AnimateInstance&&t[e].dom7AnimateInstance.stop()}function pt(e){for(var n=this,i=[],r=arguments.length-1;r-- >0;)i[r]=arguments[r+1];if(void 0===i[0]){for(var o=0;o<this.length;o+=1)Wt.indexOf(e)<0&&(e in n[o]?n[o][e]():t(n[o]).trigger(e));return this}return(s=this).on.apply(s,[e].concat(i));var s}function gt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["click"].concat(t))}function mt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["blur"].concat(t))}function yt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["focus"].concat(t))}function wt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["focusin"].concat(t))}function bt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["focusout"].concat(t))}function Lt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["keyup"].concat(t))}function Et(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["keydown"].concat(t))}function xt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["keypress"].concat(t))}function St(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["submit"].concat(t))}function Tt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["change"].concat(t))}function At(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mousedown"].concat(t))}function Nt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mousemove"].concat(t))}function Ct(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseup"].concat(t))}function kt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseenter"].concat(t))}function Dt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseleave"].concat(t))}function Mt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseout"].concat(t))}function Ot(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["mouseover"].concat(t))}function Ft(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["touchstart"].concat(t))}function It(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["touchend"].concat(t))}function Vt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["touchmove"].concat(t))}function qt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["resize"].concat(t))}function Ht(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return pt.bind(this).apply(void 0,["scroll"].concat(t))}var Pt=function(t){for(var e=this,n=0;n<t.length;n+=1)e[n]=t[n];return e.length=t.length,this};t.fn=Pt.prototype,t.Class=Pt,t.Dom7=Pt;var Bt=Object.freeze({addClass:o,removeClass:s,hasClass:a,toggleClass:l,attr:h,removeAttr:f,prop:u,data:c,removeData:d,dataset:v,val:p,transform:g,transition:m,on:y,off:w,once:b,trigger:L,transitionEnd:E,animationEnd:x,width:S,outerWidth:T,height:A,outerHeight:N,offset:C,hide:k,show:D,styles:M,css:O,toArray:F,each:I,forEach:V,filter:q,map:H,html:P,text:B,is:j,indexOf:z,index:W,eq:R,append:U,appendTo:X,prepend:Y,prependTo:G,insertBefore:J,insertAfter:K,next:Q,nextAll:Z,prev:$,prevAll:_,siblings:tt,parent:et,parents:nt,closest:it,find:rt,children:ot,remove:st,detach:at,add:lt,empty:ht}),jt=Object.freeze({scrollTo:ft,scrollTop:ut,scrollLeft:ct}),zt=Object.freeze({animate:dt,stop:vt}),Wt="resize scroll".split(" ");return[Bt,jt,zt,Object.freeze({click:gt,blur:mt,focus:yt,focusin:wt,focusout:bt,keyup:Lt,keydown:Et,keypress:xt,submit:St,change:Tt,mousedown:At,mousemove:Nt,mouseup:Ct,mouseenter:kt,mouseleave:Dt,mouseout:Mt,mouseover:Ot,touchstart:Ft,touchend:It,touchmove:Vt,resize:qt,scroll:Ht})].forEach(function(e){Object.keys(e).forEach(function(n){t.fn[n]=e[n]})}),t});
//# sourceMappingURL=dom7.min.js.map


var $$ = Dom7;